import { getListApi } from '../api/xxy-getIndex'
import { ref, reactive, onMounted } from 'vue'
export const useListAsync = () => {
  const list = ref([])
  const count = ref(0)
  const getList = async (url) => {
    let res = await getListApi(url)
    console.log(res)
    list.value = res.data.rows
    count.value = res.data.count
  }
  return { list, getList, count }
}